<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html> 
<html lang="en"> 
<head> 
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>【魔兽世界私服·决战之巅】 World Of Warcraft</title>
	<%@include file="../css.jsp" %>
	<link href="${resourceRoot }/css/common.css" rel="stylesheet" type="text/css" />
	<link rel="shortcut icon" href="${resourceRoot }/images/wow.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" media="screen" href="${resourceRoot }/css/mop-landing.css" />
	<!--[if IE 6]> <link rel="stylesheet" type="text/css" media="all" href="${resourceRoot }/css/landing-ie6.css" />
	<![endif]-->
	<style type="text/css">
		a,a:hover{ 
			text-decoration:none; color:#333;
			font-family: 微软雅黑, Microsoft YaHei, Helvetica, Tahoma, StSun, 宋体, SimSun, sans-serif !important;
			font-style: normal !important;
			font-size: 15px;
		}
		tr {
		cursor: pointer;
		}
		
		td{
			font-family: 微软雅黑, Microsoft YaHei, Helvetica, Tahoma, StSun, 宋体, SimSun, sans-serif !important;
			font-style: normal !important;
			font-size: 14px;
		}
		th{
			font-family: 微软雅黑, Microsoft YaHei, Helvetica, Tahoma, StSun, 宋体, SimSun, sans-serif !important;
			font-size: 15px;
			font-weight: bold;
		}
		html,body {
	    	height: 100%;
		}
	</style>
	<script type="text/javascript">
		function vote(fid){
			$.get("/family/vote?fid="+fid,function(res){
				alert(res);
			});
		}
	</script> 
</head>

<body>
<%@include file="../header.jsp" %>

<div class="container" style="width: 77%;">
	 
	  <%@include file="../template/adv.html"%>
	
	<div class="row-fluid content">
		<table class="table table-bordered table-condensed table-hover tb">
         		<thead>
                <tr style="background: #af3900;">
                  <th style="width: 20%;">服务器名</th>
                  <th style="width: 20%;">推荐星级</th>
                  <th style="width: 10%;">游戏线路</th>
                  <th style="width: 45%;">版本特色介绍</th>
                  <th style="width: 5%;">客服QQ</th>
                </tr>
              </thead>
              <tbody>
                <c:forEach items="${tcList}" var="tag" varStatus="s">
               		<c:if test="${s.count<=4 }">
	                	<c:forEach items="${tag.contentList }" var="c" >
			                <tr style="${tag.css}">
			                  <td><a href="/url?u=${c.site }" target="_blank">${c.title10 }</a></td>
			                  <td>${tag.name }</td>
			                  <td>${c.lineName }</td>
			                  <td><a href="${c.site }" target="_blank">${c.desc10 }</a></td>
			                  <td>${c.qq }</td>
			                </tr>
		                </c:forEach>
	                </c:if>
	                
	                <c:if test="${s.count==5}">
		                <c:forEach items="${pm5.list }" var="c">
		                <tr style="${tag.css}">
		                  <td ><a href="/url?u=${c.site }" target="_blank">${c.title10 }</a></td>
		                  <td>今日新开</td>
		                  <td>${c.lineName }</td>
		                  <td><a href="${c.site }" target="_blank">${c.desc10 }</a></td>
		                  <td>${c.qq }</td>
		                </tr>
	                	</c:forEach>
	                </c:if>
	                 <c:if test="${s.count==6}">
		                	<c:forEach items="${pm6.list }" var="c">
				                <tr style="${tag.css}">
				                  <td ><a href="/url?u=${c.site }" target="_blank">${c.title10 }</a></td>
				                  <td>${c.openTime }开放</td>
				                  <td>${c.lineName }</td>
				                  <td><a href="${c.site }" target="_blank">${c.desc10 }</a></td>
				                  <td>${c.qq }</td>
				                </tr>
			                </c:forEach>
		              </c:if>
                </c:forEach>
              </tbody>
         	</table>
         	
         	<table class="table table-bordered table-condensed table-hover tb" id="family">
         		<thead>
	                <tr class="tr-family">
	                  <th>家族名称</th>
	                  <th>家族QQ</th>
	                  <th>家族YY</th>
	                  <th>游戏线路</th>
	                  <th>家族族长</th>
	                  <th>创建时间</th>
	                  <th>支持度</th>
	                  <th>投票</th>
	                </tr>
              </thead>
              <tbody>
                <c:forEach items="${familyPm.list}" var="f" varStatus="s">
	                <tr class="tr-family-content">
	                  <td>${f.name}</td>
	                  <td>${f.qq }</td>
	                  <td>${f.yy }</td>
	                  <td>${f.lineName }</td>
	                  <td>${f.leader }</td>
	                  <td>${f.created }</td>
	                  <td>${f.clicks }票</td>
	                  <td fid="${f.id }" style="text-align: center;"><button class="btn-vote" onclick="vote(${f.id})">投票</button></td>
	                </tr>
                </c:forEach>
              </tbody>
         	</table>
	</div>
    	

<%@include file="../template/article.html"%>
<%@include file="../template/footer.html"%>  	
</div>
<script type="text/javascript">
	function vote(fid){
		$.get("/family/vote?fid="+fid,function(res){
			alert(res);
		});
	}
</script>   


<%@include file="../js.jsp" %>

</body>
</html>